14/06/2021

Introduzione

Il progetto si pone come obiettivo quello di raccogliere ed analizzare i commenti relativi al Reddit di Dogecoin. Si andrà poi a compararli con i risultati di altri dataset raccolti ( Bitcoin, Ehtereum, PancakeSwap ).

Domande iniziali:

  • Quali sono gli utenti maggiormente attivi?
  • Quali sono le parole e i bigrammi più utilizzati?
  • Ci potrebbe essere una relazione tra i sentimenti dei commenti e gli eventi sociali/economici?
  • Gli utenti più attivi possono esser considerati affidabili?
  • Tra le diverse comunità c’è una differenza nel modo di esprimersi e negli argomenti trattati?

Reddit

  • è un social network aggregator.

  • non si hanno relazioni di amicizia tra utenti.

  • c’è anonimità riguardo il nome degli utenti, ma non sulle attività.

  • ogni utente può seguuire diversi forums ( subreddit ).

  • ogni subreddit tratta un argomento specifico.

  • utenti come creatori di contenuti, fruitori e moderatori.

Collect Data with Python

Per recuperare i dati del 2020 e del 2021 si è utilizzato un wrapper della libreria Pushshift.

Si è utilizzata la versione che sfrutta il multithreading in modo da accellerare il recupero delle informazioni.

Definendo una classe Miner con parametri:

  • Api key
  • Intervallo di tempo
  • Nome del subreddit d’interesse

Si istanzia un oggetto Miner per ogni subreddit d’interesse in modo da eseguire la ricerca in parallelo.

Pipeline of Work

Text Analysis

DogeCoin Corpus** Type # Comment # Post *
#num of docs Raw 1,956,662 185,823
Clean 1,848,743 182,679
#num of toks Raw 198,537 198,709
Clean 140,231 140,241
#num of docs bigrams Raw 1,956,656 185,823
Clean 1,569,893 172,952
#num of toks bigrams Raw 3,597,421 4,165,904
Clean 3,189,821 3,646,399
* with stop words
** tokens not unique 

Spell Checking

DogeCoin Corpus Type # Original Post # Post *
#num of docs Raw 185,823 183,609
Clean 182,679 182,646
#num of toks Raw 198,709 198.473
Clean 140,241 140,175
# hunspell check TRUE 36,086 36,118
#num of docs bigrams Raw 185,823 185,823
Clean 172,952 174,777
#num of toks bigrams Raw 4,165,904 3,159,569
Clean 3,646,399 2,316,567
* with spell checker 

Terms and Bigrams

Sentiment Analysis

Sentiments per Words

Sentiments per Bigrams

Bigrams Network

LDA - Topic Analysis

Sentiment Polarity

Sentiment polarity for an element defines the orientation of the expressed sentiment, i.e., it determines if the text expresses the positive, negative or neutral sentiment of the user about the entity in consideration.

\[ polarity = (pos + neut*0.4) - (neg + neut*0.6) \]

## # A tibble: 5 x 11
## # Rowwise: 
##      id negative neutral positive polarity   dim polarity_dim polarity_sig_dim
##   <int>    <dbl>   <dbl>    <dbl>    <dbl> <dbl>        <dbl>            <dbl>
## 1     2        3       0        0     -3       3         -0.5            0.378
## 2     4        0       0        1      1       1          1              0.731
## 3    37        0       0        1      1       1          1              0.731
## 4    49        0       1        0     -0.2     1         -0.2            0.450
## 5    91        0       0        2      2       2          1              0.731
## # … with 3 more variables: polarity_tan_dim <dbl>, polarity_sig <dbl>,
## #   polarity_tan <dbl>

Polarity Distribution

Number of Comments

Over Time Sentiment

Over Time Sentiment 2021

Network Analysis

Non essendoci relazioni di amicizia o di followers, si è deciso di definire come relazione tra due utenti l’azione di commentare uno stesso post o commento. A causa dell’enorme quantità di dati rispetto al numero di nodi si è dovuto semplifacare ancor di più il grafo.

Nodi:

  • utenti con il maggior numero di commenti

Features per ogni utente:

  • score medio
  • sentimento medio

Archi:

  • relazione – “ha avuto un’interazione nello stesso commento/post”

Score Distribution

Score of Network

Users Network

Betweenness

Other Results - PancakeSwap

Other Results - EthTrader

References

  • Advanced Data Science course. Prof. Massimo Franceschet. Università degli Studi di Udine - DMIF
  • Benoit, Kohei Watanabe, Kenneth, and Akitaka Matsuo. 2018. “Quanteda: An r Package for the Quantitative Analysis of Textual Data.” Journal of Open Source Software
  • C. J. Hutto, Eric Gilbert. 2014. “VADER: A Parsimonious Rule-Based Model for Sentiment Analysis of Social Media Text.”
  • Pano, Toni, and Rasha Kashef. 2020. “A Complete VADER-Based Sentiment Analysis of Bitcoin (BTC) Tweets During the Era of COVID-19.” Big Data and Cognitive Computing.
  • Thurner, Stefan, Rudolf Hanel, Bo Liu, and Bernat Corominas-Murtra. 2015. “Understanding Zipf’s Law of Word Frequencies Through Sample-Space Collapse in Sentence Formation.” Journal of The Royal Society Interface